package Demo1;
import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 34255
 * Date: 2024-05-29
 * Time: 18:57
 */
class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        String str = in.nextLine();
        int ret = str.lastIndexOf(" ");
        String string = str.substring(ret + 1);
        System.out.print(string.length());
    }
}
public class Test {
    public static void main(String[] args) {

    }
}
